export default function(api,get){
	
	console.log("已获取接口类型数据")
	console.log(api)
	console.log("请求方法，get = 获取视频列表？搜索视频列表？获取视频详情？...")
	console.log(get)
	const apivod = api.apivod
	const ac_detail = api.ac_detail
	const ac_list = api.ac_list
	const ac_videolist = api.ac_videolist
	const search_suggest = api.search_suggest
	const search_videolist = api.search_videolist
	if (get == 'getVideolist') {
		//获取视频列表
		let ac = ac_videolist
		getVideolist(apivod,ac)
		
		
	}
	
}


/**
 * // 初始化视频列表信息
 */
function getVideolist(apivod,ac){
	//let res = {}
	let that = this
	console.log("apivod = " + apivod)
	console.log("ac模式 = " + ac)
	//从本地缓存中同步获取后台配置的接口地址
	const value = uni.getStorageSync('xtsetting')
	console.log("获取api接口地址")
	console.log(value.APIjiekoUrl)
	//Api接口地址
	let APIjiekoUrl = value.APIjiekoUrl
	uni.showLoading({
		title:"获取数据中"
	})
	uni.request({
		url:APIjiekoUrl+apivod,
		data:{
			ac:ac
		},
		success: (res) => {
			console.log(res)
			
			// this.videodata = res
			// console.log("this.videodata")
			// console.log(this.videodata)
			
			
			uni.showToast({
				title:"数据获取成功",
				icon:"none"
			})	
		},
		fail: (err) => {
			console.log(err)
			uni.showToast({
				title:"数据获取失败",
				icon:"none"
			})
		},
		complete() {
			uni.hideLoading()
		}
			
	})
}
